<?php

class Zend_View_Helper_FlashMsg extends Zend_View_Helper_Abstract
{


    public function flashmsg($tipomsg = 'flash')
    {

        $flashMessenger = new Zend_Controller_Action_Helper_FlashMessenger();
        $messages = $flashMessenger->getMessages();

        if (count($messages) > 0)
        {
            $msg = implode('<br>', $messages);

            return $this->view->msg($msg, $tipomsg);
        }

        return '';


    }


}
